package com.cloud.entity.mes;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 线路板工单表(MesPcbProduceTask)实体类
 *
 * @author makejava
 * @since 2021-09-10 10:29:03
 */
@Data
@Table(name = "mes_pcb_producetask")
public class MesPcbProduceTask implements Serializable {
    private static final long serialVersionUID = -36913196607091091L;
    /**
     * id
     */
    @Column(name = "id")
    @ApiModelProperty(value = "id")
    private String id;
    /**
     * 工厂id
     */
    @Column(name = "factory_id")
    @ApiModelProperty(value = "工厂id")
    private String factoryId;
    /**
     * 工厂名称
     */
    @Column(name = "factory_name")
    @ApiModelProperty(value = "工厂名称")
    private String factoryName;
    /**
     * 工单号
     */
    @Column(name = "code")
    @ApiModelProperty(value = "工单号")
    private String code;
    /**
     * 物料id
     */
    @Column(name = "product_id")
    @ApiModelProperty(value = "物料id")
    private String productId;
    /**
     * 物料编码
     */
    @Column(name = "product_code")
    @ApiModelProperty(value = "物料编码")
    private String productCode;
    /**
     * 物料名称
     */
    @Column(name = "product_name")
    @ApiModelProperty(value = "物料名称")
    private String productName;
    /**
     * 计划数量
     */
    @Column(name = "plan_amount")
    @ApiModelProperty(value = "计划数量")
    private Integer planAmount;
    /**
     * 完工数量
     */
    @Column(name = "complete_amount")
    @ApiModelProperty(value = "完工数量")
    private Integer completeAmount;
    /**
     * 是否下发 0否 1是
     */
    @ApiModelProperty(value = "是否下发 0否 1是")
    private Integer isIssue;
    /**
     * 工单类型 0标准 1返工
     */
    @Column(name = "type")
    @ApiModelProperty(value = "工单类型 0标准 1返工")
    private Integer type;
    /**
     * 工单状态 0未开始 1制造中 2已完成 3已关闭
     */
    @Column(name = "status")
    @ApiModelProperty(value = "工单状态 0未开始 1制造中 2已完成 3已关闭")
    private Integer status;
    /**
     * 开停状态:1开工、2暂停
     */
    @Column(name = "open_pause_status")
    @ApiModelProperty(value = "开停状态:1开工、2暂停")
    private Integer openPauseStatus;
    /**
     * 是否生成配件码 0:否 1:是
     */
    @Column(name = "is_parts_code")
    @ApiModelProperty(value = "是否生成配件码 0:否 1:是")
    private Integer isPartsCode;
    /**
     * 是否生成配件箱码 0:否 1:是
     */
    @Column(name = "is_parts_boxcode")
    @ApiModelProperty(value = "是否生成配件箱码 0:否 1:是")
    private Integer isPartsBoxcode;
    /**
     * 是否生成集成码 0:否 1:是
     */
    @Column(name = "is_integrate_code")
    @ApiModelProperty(value = "是否生成集成码 0:否 1:是")
    private Integer isIntegrateCode;

    /**
     * 集成码绑定量
     */
    private Integer bindAmount;

    /**
     * 集成码设定绑定量
     */
    private Integer setBindAmount;
    /**
     * 计划开始时间
     */
    @Column(name = "plan_start_time")
    @ApiModelProperty(value = "计划开始时间")
    private Date planStartTime;
    /**
     * 计划结束时间
     */
    @Column(name = "plan_end_time")
    @ApiModelProperty(value = "计划结束时间")
    private Date planEndTime;
    /**
     * 实际开始时间
     */
    @Column(name = "actual_start_time")
    @ApiModelProperty(value = "实际开始时间")
    private Date actualStartTime;
    /**
     * 实际结束时间
     */
    @Column(name = "actual_end_time")
    @ApiModelProperty(value = "实际结束时间")
    private Date actualEndTime;

    /**
     * 外部工单号（供方工单号）
     */
    private String externalWorkCode;
    /**
     * 创建人id
     */
    @Column(name = "cd_user_id")
    @ApiModelProperty(value = "创建人id")
    private String cdUserId;
    /**
     * 创建人名称
     */
    @Column(name = "cd_user_name")
    @ApiModelProperty(value = "创建人名称")
    private String cdUserName;
    /**
     * 创建时间
     */
    @Column(name = "cd_time")
    @ApiModelProperty(value = "创建时间")
    private Date cdTime;
    /**
     * 修改人id
     */
    @Column(name = "md_user_id")
    @ApiModelProperty(value = "修改人id")
    private String mdUserId;
    /**
     * 修改人名称
     */
    @Column(name = "md_user_name")
    @ApiModelProperty(value = "修改人名称")
    private String mdUserName;
    /**
     * 修改时间
     */
    @Column(name = "md_time")
    @ApiModelProperty(value = "修改时间")
    private Date mdTime;
    /**
     * 删除标识 0否 1是
     */
    @Column(name = "deleted")
    @ApiModelProperty(value = "删除标识 0否 1是")
    private Integer deleted;
    /**
     * 申请数量
     */
    @ApiModelProperty(value = "申请数量")
    private Integer applyAmount;
    //子工单
    @Transient
    private List<MesPcbProduceTaskDetails> mesPcbProducetaskDetails;

}
